package com.example.gitstudy.git.controller;

import cn.hutool.json.JSON;
import cn.hutool.json.JSONObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/huToolTest")
public class huToolTestController {

    @PostMapping("/getString")
    public String getString(@RequestBody String params){
        System.out.println(params);

        JSONObject jsonObject = new JSONObject(params);

        String result = "username:"+jsonObject.get("username") +",password:"+jsonObject.get("password");
        return result;
    }

}
